public class Test {
    public static void main(String[] args) {
        MyBarTree myBarTree=new MyBarTree();
       TreeNode root=myBarTree.creatTree();
        myBarTree.NLRPrint(root);
        System.out.println();
        myBarTree.LNRPrint(root);
        System.out.println();

        myBarTree.LRNPrint(root);
        System.out.println();
        System.out.println(myBarTree.size1(root));
        System.out.println(myBarTree.size2(root));
        myBarTree.getLeafNodeCount1(root);
        System.out.println(myBarTree.leafCount);
        System.out.println(myBarTree.getLeafNodeCount3(root));
        System.out.println(myBarTree.getKLevelNodeCount(root, 1));
        System.out.println(myBarTree.getHight(root));
        try {
            TreeNode ret=myBarTree.find(root,'M');
            System.out.println(ret.val);
        }catch (RuntimeException e){
            e.printStackTrace();
            System.out.println("没有这个节点");
        }
        System.out.println(myBarTree.isCompleteTree(root));
        myBarTree.LevelOrder(root);
    }


}
